package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.model.domain.OmcNursingGroupNew;
import com.csun.cmny.provider.model.dto.NursingRoomDto;
import com.csun.cmny.provider.model.dto.OmcNursingGroupNewDto;
import com.csun.cmny.provider.pojo.Room;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface OmcNursingGroupNewMapper extends Mapper<OmcNursingGroupNew> {
    /**
     * 存储班组人员，房间信息
     */
    void saveOtherUser(OmcNursingGroupNewDto nursingGroupNewDto);
    void saveOtherRoom(OmcNursingGroupNewDto nursingGroupNewDto);
    /*
     * 查询班组
     * */
    List<OmcNursingGroupNewDto> selectNursingGroup(OmcNursingGroupNewDto nursingGroupNewDto);

    /**
     * 删除班组人员，房间信息
     */
    void deleteOtherUser(Long id);
    void deleteOtherRoom(Long id);

    List<Room> selectNursingBindRoom(Long nursingGroupId);
    /**
     * 通过buildingId查询该机构没有被分配的房间
     */
    List<Room> selectByBuildingId(Long buildingId);
    /*
    * 根据护工id查询绑定的房间
    * */
    List<NursingRoomDto> selectByGroupId(@Param("userIds") List<Long> userIds);
}